<template>
  <img ref="img" class="d_avatar" @error="load" :src="url || src" alt="" />
</template>

<script>
export default {
	props: {
		src: {
			type: String,
		},
	},
	data() {
		return {
			url: '',
		}
	},
	methods: {
		load(e) {
			this.url = 'http://image.16988.com/image/20210107/b4d0f8d275d34451bbd2cebebc7ce990.png'
		},
	},
}
</script>

<style lang="scss" scoped>
img{
	width: 100%;
	height: 100%;
}
</style>
